@import (reference) "../../../node_modules/bootstrap/less/bootstrap.less";
@import (reference) "../lib/wb-vars.css.less";
@import (reference) "../lib/wb-fontstyles.css.less";
@import (reference) "../lib/controls/wb-buttons.css.less";
@import (reference) "../lib/controls/wb-breadcrumbs.css.less";

@form-btns-hldr-height: 66px;
@form-holder-height: calc(~"100%" - (@form-btns-hldr-height));

.opacity (@opacity: 0.5) {
    -webkit-opacity: @opacity;
    -moz-opacity: @opacity;
    opacity: @opacity;
}

#loading-logo {
    width: @left-menu-width;
    height: @header-height;
    position: absolute;
    top: -1px;
    left: 0;
    z-index: 900;
    background: url(../i/d-loading.gif) left top no-repeat;
}

.ace_editor {
    height: 30px;
}

.pseudo-form-control {
    border: 2px solid #cccccc;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 4px;
    background-color: #fff;
    &.focused{
        border-color: #66afe9;
        outline: 0;
        box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
    }
}


.ui-match {
    background-color: #FFCC00;
    border-top: solid 1px #FAD540;
    border-bottom: solid 1px #FAD540;
    border-radius: 3px;
    padding: 0;
}

.scroller {
    height: 100%;
    overflow-y: hidden;
    position: relative;
}

.angular-ui-tree-placeholder {
    border: none;
    height: @questionnaire-tree-item-height;
    background: rgba(0,0,0,0.1);
}

@selected-panel-bg-color: #e5e8ea;
@selected-panel-border-color: #dbdfe2;
@selected-panel-grey-color: #7e898f;
@leftpanel-accent-color: #e004c9;
@leftpanel-icons-sprite: '../i/designer-left-icons-4.png';
@leftpanel-icon-height: 50px;

#left-menu {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 900;
    width: @left-menu-width;
    height: 100%;
    background: @designer-editor-mediumblue-bg-color;
    .transition(width 0.4s ease);

    ul {
        margin: 0;
        padding: 0;
        list-style: none;

        li a {
            height: @left-menu-width;
            display: block;
            cursor: pointer;
            line-height: @left-menu-width;
            word-break: keep-all;
            white-space: nowrap;
            text-align: center;
            color: #fff;
            text-decoration: none;


            &.left-menu-chapters {
                background: url(@leftpanel-icons-sprite) 0 0 no-repeat;
            }

            &.left-menu-macroses {
                background: url(@leftpanel-icons-sprite) 0 -@leftpanel-icon-height*2 no-repeat;
            }

            &.left-menu-scenarios {
                background: url(@leftpanel-icons-sprite) 0 -@leftpanel-icon-height*6 no-repeat;
            }

            &.left-menu-lookupTables {
                background: url(@leftpanel-icons-sprite) 0 -@leftpanel-icon-height*3 no-repeat;
            }

            &.left-menu-attachments {
                background: url(@leftpanel-icons-sprite) 0 -@leftpanel-icon-height*4 no-repeat;
            }

            &.left-menu-translations {
                background: url(@leftpanel-icons-sprite) 0 -@leftpanel-icon-height*1 no-repeat;
            }

            &.left-menu-comments {
                background: url(@leftpanel-icons-sprite) 0 -@leftpanel-icon-height*7 no-repeat;
            }

            &:hover {
                background-color: #dbdfe2;
            }

            &.unfolded {
                color: #7e898f;
                background-color: @selected-panel-bg-color;
            }
        }
    }
}

@panel-width: 85%;
@divider-width: 275px;
@foldback-button-size: 50px;
@light-grey: #c1c7cb;

.left-side-panel {
    position: absolute;
    top: 0;
    z-index: 800;
    width: calc(~"50%" - (@left-menu-width));
    left: -50%;
    height: 100%;
    .transition(left 0.4s ease);

    .left-side-panel-content {
        width: @panel-width;
        background: @selected-panel-bg-color;
        height: 100%;
        position: relative;

        h3 {
            .chapters-title-fontstyle();
            margin: 18px 24px 20px 18px;
            color: @selected-panel-grey-color;
            padding-left: 10px;
        }

        .button-holder {
            input, button, .btn {
                background: @selected-panel-bg-color;
            }

            margin: 8px;
            padding-left: 24px;
            padding-top: 24px;
            border-top: 2px solid @selected-panel-border-color;
        }

        .empty-list {
            margin: 8px;
            padding-left: 20px;
            padding-top: 10px;
            border-top: 2px solid @selected-panel-border-color;
            padding-right: 30%;
            color: @selected-panel-grey-color;

            p:first-child {
                font-weight: bold;
                color: darken(@selected-panel-grey-color, 15%);
            }
        }

        .variable-name {
            color: @leftpanel-accent-color;
        }
    }

    .foldback-region {
        position: absolute;
        top: 0;
        left: @panel-width;
        right: 0;
        bottom: 0;
        background: url(../i/left-panel-shadow-small.png) repeat-y;
    }


    .foldback-button {
        display: none;
        position: absolute;
        cursor: pointer;
        top: 0;
        right: -@foldback-button-size;
        z-index: 15;
        width: @foldback-button-size;
        height: @foldback-button-size;
        background: @selected-panel-bg-color url(../i/arrow-left.png) center 0 no-repeat;
        border-left: 1px solid @selected-panel-border-color;

        &:hover {
            background-position: -3px -55px;
        }
    }

    a.delete-btn {
        @delete-button-position: 10px;
        @delete-button-size: 15px;
        position: absolute;
        top: @delete-button-position;
        right: @delete-button-position;
        display: block;
        background: url("../i/cross-red.png") center center no-repeat;
        width: @delete-button-size;
        height: @delete-button-size;
        .opacity(0.3);

        &:hover {
            .opacity(1);
        }
    }

    .actions {
        margin-left: -6px;
        margin-right: -6px;
        position: relative;
    }

    &.unfolded {
        left: @left-menu-width;
        cursor: default;
        background-image: none;
        display: block;

        .foldback-button {
            display: block;
        }
    }

    input[type="text"],
    textarea {
        .placeholder-style() {
            .lucida-console-font();
            font-size: 14px;
            text-overflow: ellipsis;
        }

        &[placeholder] {
            .placeholder-style();
        }

        &::-moz-placeholder {
            .placeholder-style();
        }

        &:-ms-input-placeholder {
            .placeholder-style();
        }

        &::-webkit-input-placeholder {
            .placeholder-style();
        }
    }
}

.lookup-tables-panel {
    @lookup-panel-padding-left: 20px;
    @lookup-panel-table-item-bg: #fff;
    @lookup-accent-color: #e004c9;
    @lookup-border-color: #d9dde0;
    @lookup-drop-box-color: #78838a;

    .lookup-tables {
        height: 100%;

        ul {
            margin: 0;
            padding: 0;
            list-style: none;
            padding-right: 30px;
            padding-left: @lookup-panel-padding-left;

            li {
                background: @lookup-panel-table-item-bg;
                margin-bottom: 7px;
                padding: 5px 10px 5px 10px;
                .border-left-radius(8px);
                .border-right-radius(8px);
                border: 2px solid @lookup-panel-table-item-bg;
                position: relative;
                z-index: 10;
                .lucida-console-font();

                &:hover {
                    border: 2px solid @lookup-border-color;
                }

                .drop-box {
                    @lookup-panel-table-item-border-width: 2px;
                    @lookup-panel-table-item-height: 30px;
                    color: @lookup-drop-box-color;
                    border: @lookup-panel-table-item-border-width dashed @lookup-drop-box-color;
                    height: @lookup-panel-table-item-height;
                    text-align: center;
                    line-height: @lookup-panel-table-item-height - 2*@lookup-panel-table-item-border-width;
                    display: none;
                }

                &.dragover .drop-box {
                    display: block;
                }
                
                form.dragover .drop-box {
                    display: block;
                }

                input, textarea {
                    display: block;
                    border: none;
                    border-color: @lookup-panel-table-item-bg;
                    box-shadow: none;
                    .arial-font();
                    padding-left: 0;
                    padding-right: 0;
                    border-radius: 0;
                    .lucida-console-font();
                    font-size: 14px;
                }

                input.table-name {
                    width: @divider-width;
                    color: @leftpanel-accent-color;
                }

                .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
                    background: @lookup-panel-table-item-bg;
                }

                input[type="text"],
                textarea {
                    .placeholder-style() {
                        .lucida-console-font();
                        font-size: 14px;
                        text-overflow: ellipsis;
                    }

                    &[placeholder] {
                        .placeholder-style();
                    }

                    &::-moz-placeholder {
                        .placeholder-style();
                    }

                    &:-ms-input-placeholder {
                        .placeholder-style();
                    }

                    &::-webkit-input-placeholder {
                        .placeholder-style();
                    }
                }

                .divider {
                    height: 2px;
                    width: @divider-width;
                    background: @lookup-border-color;
                }

                .actions {
                    button, a.btn {
                        background: @lookup-panel-table-item-bg;

                        &:hover {
                            background: #e6e6e6;
                        }
                    }

                    .permanent-actions {
                        background: @lookup-panel-table-item-bg;
                        -webkit-box-shadow: -30px 1px 25px 0px @lookup-panel-table-item-bg;
                        -moz-box-shadow: -30px 1px 25px 0px @lookup-panel-table-item-bg;
                        box-shadow: -30px 1px 25px 0px @lookup-panel-table-item-bg;
                        bottom: 5px;
                        position: absolute;
                        right: 0;
                        padding-left: 5px;
                    }

                    &.dirty .permanent-actions {
                        position: static;
                    }
                }
            }
        }
    }
}

.categories-panel {
    min-width: (1280px) / 2 - @left-menu-width - @foldback-button-size;

    @attachments-panel-padding-left: 20px;
    @attachments-panel-table-item-bg: #fff;
    @attachments-accent-color: #e004c9;
    @attachments-border-color: #d9dde0;
    @attachments-drop-box-color: #78838a;
    @attachments-preview-width: 156px;
    @attachments-preview-height: 140px;
    @attachments-meta-color: #98a0a5;

    .categories {
        height: 100%;

        div.categories-list {
            margin: 0;
            padding: 0;
            list-style: none;
            padding-right: 30px;
            padding-left: @attachments-panel-padding-left;

            div.categories-panel-item {
                background: @attachments-panel-table-item-bg;
                margin-bottom: 7px;
                padding: 5px 10px;
                min-height: 65px;
                .border-left-radius(8px);
                .border-right-radius(8px);
                border: 2px solid @selected-panel-bg-color;
                position: relative;
                z-index: 10;
                .lucida-console-font();

                &:hover {
                    border-color: @attachments-border-color;
                }

                .drop-box {
                    @lookup-panel-table-item-border-width: 2px;
                    @lookup-panel-table-item-height: 30px;
                    color: @attachments-drop-box-color;
                    border: @lookup-panel-table-item-border-width dashed @attachments-drop-box-color;
                    height: @lookup-panel-table-item-height;
                    text-align: center;
                    line-height: @lookup-panel-table-item-height - 2*@lookup-panel-table-item-border-width;
                    display: none;
                }

                &.dragover .drop-box {
                    display: block;
                }

                input, textarea {
                    display: block;
                    border: none;
                    border-color: @attachments-panel-table-item-bg;
                    box-shadow: none;
                    .arial-font();
                    padding-left: 0;
                    padding-right: 0;
                    border-radius: 0;
                    .lucida-console-font();
                    font-size: 14px;
                }

                input.table-name {
                    width: @divider-width;
                    color: @leftpanel-accent-color;
                }

                .actions {
                    top: -5px;

                    button, a.btn {
                        background: @attachments-panel-table-item-bg;

                        &:hover {
                            background: #e6e6e6;
                        }
                    }

                    .permanent-actions {
                        padding-left: 5px;
                        display: none;
                    }

                    &.dirty .permanent-actions {
                        position: static;
                    }
                }

                &:hover {
                    .actions .permanent-actions {
                        display: block;
                    }
                }
            }
        }
    }
}

.translations-panel
{
    min-width: (1280px) / 2 - @left-menu-width - @foldback-button-size;

    @attachments-panel-padding-left: 20px;
    @attachments-panel-table-item-bg: #fff;
    @attachments-accent-color: #e004c9;
    @attachments-border-color: #d9dde0;
    @attachments-drop-box-color: #78838a;
    @attachments-preview-width: 156px;
    @attachments-preview-height: 140px;
    @attachments-meta-color: #98a0a5;

    .translations {
        height: 100%;

        div.translation-list {
            margin: 0;
            padding: 0;
            list-style: none;
            padding-right: 30px;
            padding-left: @attachments-panel-padding-left;

            div.translations-panel-item {
                background: @attachments-panel-table-item-bg;
                margin-bottom: 7px;
                padding: 5px 10px;
                min-height: 65px;
                .border-left-radius(8px);
                .border-right-radius(8px);
                border: 2px solid @selected-panel-bg-color;
                position: relative;
                z-index: 10;
                .lucida-console-font();

                &:hover {
                    border-color: @attachments-border-color;
                }

                .drop-box {
                    @lookup-panel-table-item-border-width: 2px;
                    @lookup-panel-table-item-height: 30px;
                    color: @attachments-drop-box-color;
                    border: @lookup-panel-table-item-border-width dashed @attachments-drop-box-color;
                    height: @lookup-panel-table-item-height;
                    text-align: center;
                    line-height: @lookup-panel-table-item-height - 2*@lookup-panel-table-item-border-width;
                    display: none;
                }

                &.dragover .drop-box {
                    display: block;
                }

                input, textarea {
                    display: block;
                    border: none;
                    border-color: @attachments-panel-table-item-bg;
                    box-shadow: none;
                    .arial-font();
                    padding-left: 0;
                    padding-right: 0;
                    border-radius: 0;
                    .lucida-console-font();
                    font-size: 14px;
                }

                input.table-name {
                    width: @divider-width;
                    color: @leftpanel-accent-color;
                }

                .actions {
                    top: -5px;

                    button, a.btn {
                        background: @attachments-panel-table-item-bg;

                        &:hover {
                            background: #e6e6e6;
                        }
                    }

                    .default-label {
                        padding-left: 7px;
                        padding-right: 5px;
                    }

                    .permanent-actions {
                        padding-left: 5px;
                        display: none;
                    }

                    &.dirty .permanent-actions {
                        position: static;
                    }
                }

                &:hover{
                    .actions .permanent-actions {
                        display: block;
                    }
                }
            }
        }
    }
}

.attachments-panel {
    min-width: (1280px) / 2 - @left-menu-width - @foldback-button-size;

    @attachments-panel-padding-left: 20px;
    @attachments-panel-table-item-bg: #fff;
    @attachments-accent-color: #e004c9;
    @attachments-border-color: #d9dde0;
    @attachments-drop-box-color: #78838a;
    @attachments-preview-width: 156px;
    @attachments-preview-height: 140px;
    @attachments-meta-color: #98a0a5;

    .attachments {
        height: 100%;


        .panel-header {
            margin: 18px 24px 20px 18px;

            .title {
                margin-right: 12px;
            }

            h3 {
                margin: 12px 0 0 0;
            }

            .estimated-download-time {
                color: @light-grey;
                .georgia-font();
                font-style: italic;
                margin: 0;
                padding-left: 10px;
            }
        }

        div.attachment-list {
            margin: 0;
            padding: 0;
            list-style: none;
            padding-right: 30px;
            padding-left: @attachments-panel-padding-left;

            div.attachments-panel-item {
                background: @attachments-panel-table-item-bg;
                margin-bottom: 7px;
                padding: 12px 10px 5px 10px;
                min-height: 80px;
                .border-left-radius(8px);
                .border-right-radius(8px);
                border: 2px solid @selected-panel-bg-color;
                position: relative;
                z-index: 10;
                .lucida-console-font();

                .error,
                .error-message {
                    color: #e64545;
                    margin: 0;
                }

                &:hover {
                    border-color: @attachments-border-color;
                }

                .attachment {
                    display: table;
                    width: 100%;
                }

                .attachment-preview {
                    display: table-cell;
                    vertical-align: top;
                    width: @attachments-preview-width;
                    border-right: 1px solid @attachments-border-color;

                    .attachment-preview-cover {
                        height: @attachments-preview-height;
                        width: @attachments-preview-width;
                        margin-right: 12px;
                        overflow: hidden;
                        cursor: pointer;

                        img {
                            max-height: @attachments-preview-height;
                            max-width: @attachments-preview-width;
                            object-fit: contain;
                            object-position: 100% 0;
                        }
                    }
                }

                .attachment-content {
                    display: table-cell;
                    vertical-align: top;
                    padding-left: 12px;

                    .attachment-meta {
                        .georgia-font();
                        color: @attachments-meta-color;
                        font-size: 14px;
                        font-style: italic;
                        margin: 0;
                        p {
                            margin: 0;
                        }
                        .file-name{
                            display: inline-block;
                            word-break: break-all;
                        }
                    }
                }

                .drop-box {
                    @lookup-panel-table-item-border-width: 2px;
                    @lookup-panel-table-item-height: 30px;
                    color: @attachments-drop-box-color;
                    border: @lookup-panel-table-item-border-width dashed @attachments-drop-box-color;
                    height: @lookup-panel-table-item-height;
                    text-align: center;
                    line-height: @lookup-panel-table-item-height - 2*@lookup-panel-table-item-border-width;
                    display: none;
                }

                &.dragover .drop-box {
                    display: block;
                }

                input, textarea {
                    display: block;
                    border: none;
                    border-color: @attachments-panel-table-item-bg;
                    box-shadow: none;
                    .arial-font();
                    padding-left: 0;
                    padding-right: 0;
                    border-radius: 0;
                    .lucida-console-font();
                    font-size: 14px;
                }

                input.table-name {
                    width: @divider-width;
                    color: @leftpanel-accent-color;
                }

                .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
                    background: @attachments-panel-table-item-bg;
                }

                .actions {
                    margin-right: 0;
                    margin-bottom: 4px;

                    button, a.btn {
                        background: @attachments-panel-table-item-bg;

                        &:hover {
                            background: #e6e6e6;
                        }
                    }

                    .permanent-actions {
                        padding-left: 5px;
                        display: none;
                    }

                    &.dirty .permanent-actions {
                        position: static;
                    }
                }

                .divider {
                    height: 2px;
                    width: @divider-width;
                    background: @attachments-border-color;
                }

                &:hover{
                    .actions .permanent-actions {
                        display: block;
                    }
                }
            }
        }
    }
}

.macros-panel {
    @macroses-panel-padding-left: 20px;
    @macroses-panel-macros-bg: #fff;

    @macroses-border-color: #d9dde0;
    @macroses-decription-color: #78838a;

    .macroses {
        height: 100%;

        ul {
            margin: 0;
            padding: 0;
            list-style: none;
            padding-right: 30px;
            padding-left: @macroses-panel-padding-left;

            li {
                background: @macroses-panel-macros-bg;
                margin-bottom: 7px;
                padding: 5px 10px 5px 10px;
                .border-left-radius(8px);
                .border-right-radius(8px);
                border: 2px solid @macroses-panel-macros-bg;
                position: relative;
                z-index: 10;
                .lucida-console-font();

                &:hover {
                    border: 2px solid @macroses-border-color;

                    .input-group.macros-name .input-group-btn {
                        visibility: visible;
                    }
                }

                input, textarea {
                    display: block;
                    border: none;
                    border-color: @macroses-panel-macros-bg;
                    box-shadow: none;
                    .arial-font();
                    padding-left: 0;
                    padding-right: 0;
                    border-radius: 0;
                    .lucida-console-font();
                    font-size: 14px;
                }

                .divider {
                    height: 2px;
                    width: @divider-width;
                    background: @macroses-border-color;
                }

                textarea.macros-description {
                    color: @macroses-decription-color;
                }

                .input-group {
                    width: @divider-width;

                    .input-group-addon {
                        border: none;
                        border-color: @macroses-panel-macros-bg;
                        border-radius: 0;
                        background: @macroses-panel-macros-bg;
                        padding: 0;
                    }

                    &.macros-name {
                        .input-group-addon {
                            color: @leftpanel-accent-color;
                        }

                        input {
                            color: @leftpanel-accent-color;
                        }
                    }
                }

                .ace_editor {
                    border: none;
                    margin-bottom: 5px;
                    margin-top: 5px;
                    border-radius: 0;
                }


                button {
                    background: @macroses-panel-macros-bg;

                    &:hover {
                        background: #e6e6e6;
                    }
                }
            }
        }
    }
}

.chapter-panel {
    .ul-holder {
        width: 100%;
        height: 100%;

        .chapters {
            width: 100%;
            height: 100%;
            list-style: none;
            margin: 0;
            padding: 0;

            h3 {
                padding-left: 18px;
            }

            .chapters-list {
                margin-left: 18px;
            }

            .btn-group ul.dropdown-menu {
                left: inherit;
                right: 0;
            }
        }
    }
}

.comments-panel {

    .comments {
        height: 100%;
    }

    ul {
        margin: 0;
        padding: 0 20px 0 10px;
        list-style: none;
    }

    .reference-item {
        margin-bottom: 5px;
        border-radius: 4px;
        padding-left: 18px;
        white-space: nowrap;
        height: @verification-item-height;
        .arial-font();
        font-size: 16px;
        background: #fff;
        position: relative;
        display: block;
        color: @questionnarie-question-list-item-color;

        span {
            display: inline-block;
        }

        .icon {
            position: absolute;
            left: 18px;
            top: 7px;
        }

        .title {
            display: block;
            padding-left: 29px;
            line-height: @verification-item-height - 2px;
            overflow: hidden;
        }

        .title-gradient {
            position: absolute;
            right: 0;
            padding-right: 16px;
            top: 6px;
            background: @verification-item-bg-color;
        }

        .variable {
            position: absolute;
            right: 0;
            padding-right: 8px;
            padding-left: 8px;
            top: 6px;
            color: @qname-color;
            background: #fff;
            max-width: 240px;
            overflow: hidden;
            text-overflow: ellipsis;

            &:before {
                @w: 55px;
                display: block;
                position: absolute;
                height: 100%;
                content: '';
                width: @w;
                top: 0px;
                left: -@w;
                #gradient > .horizontal(rgba(242, 243, 245, 0.0), rgba(242, 243, 245, 1.0));
            }
        }
    }

    .comments-in-thread {
        margin-bottom: 15px;

        ul {
            padding: 0;

            li {
                padding: 0 10px 0 20px;
                border-bottom: 2px solid #dbdfe2;
            }

            li:last-of-type {
                border-bottom: none;
                margin-bottom: 5px;
            }
        }

        .show-more {
            color: #2a81cb;
            padding-left: 20px;
            font-weight: bold;
            font-family: "Trebuchet MS", Helvetica, sans-serif;
            text-transform: uppercase;
            font-size: 12px;
        }

        .comment {
            background: @verification-item-bg-color;

            .author {
                margin-right: 10px;
                font-style: italic;
                font-family: Georgia, serif;
                color: #79838a;
            }

            .date {
                font-family: Georgia, serif;
                color: #98a0a5;
                font-style: italic;
            }

            .comment-text {
                color: #000;
                margin: 0;
                white-space: pre-line;
            }

            &.resolved {
                background: transparent;
            }
        }
    }
}

    #designer-editor.container {
        width: 100%;
        min-width: 1280px;
        height: 100%;
        padding: 0 15px;

        section#header {
            position: relative;
            height: @header-height;
            padding-left: @left-menu-width + 18px;

            > .designer-logo {
                position: absolute;
                left: 0;
                top: 0;
                width: @left-menu-width;
                height: 100%;
                background: @designer-editor-lightblue-bg-color url(../i/d-normal.gif) left top no-repeat;
            }

            > .header-line {
                .clearfix();

                > div {
                    margin-top: 18px;
                }

                > .breadcrumbs {
                    float: left;
                    .wb-breadcrumbs('blue');
                }

                > .header-menu {
                    float: right;
                    padding-right: 10px;
                    .header-menu-fontstyle();

                    strong {
                        color: #5D6468;
                        font-weight: normal;
                    }

                    .buttons {
                        display: inline-block;
                        margin-left: 8px;

                        input[type="button"] {
                            margin-left: 3px;
                        }
                    }
                }

                > .questionnarie-title {
                    margin-right: 395px;
                    margin-top: 14px;

                    > .title {
                        .questionnarie-title-fontstyle();
                        vertical-align: top;
                        padding-right: 50px;

                        .questionnarie-title-text {
                            max-height: 25px;
                            overflow: hidden;
                            vertical-align: top;
                            text-overflow: ellipsis;
                            white-space: nowrap;
                        }

                        .questionnarie-title-buttons {
                            display: block;
                            vertical-align: top;
                            position: relative;
                        }                        

                        > span.gray {
                            .questionnarie-title-span-gray-fontstyle();
                        }

                        span.error-message,
                        span.warning-message {
                            font-weight: bold;
                            .trebuchet-font();
                            margin-left: 5px;
                            font-size: 12px;
                            text-transform: uppercase;
                            letter-spacing: 0.05em;

                            > a {
                                text-decoration: none;
                            }
                        }

                        span.error-message {
                            color: @error-message-color;

                            > a {
                                color: @error-message-link-color;
                            }

                            &.no-errors {
                                color: @designer-editor-title-span-color;

                                > a {
                                    color: @designer-editor-title-span-color;
                                }
                            }
                        }

                        span.warning-message {
                            color: @warning-message-color;

                            > a {
                                color: @warning-message-link-color;
                            }
                        }

                        span.text-success {
                            margin-left: 5px;
                            .questionnarie-title-span-success-fontstyle()
                        }
                    }
                }
            }
        }

        section#spacer {
            height: @spacer-height;

            > .left {
                float: left;
                width: @left-menu-width;
                height: 100%;
                border-top: #a4aaaf 1px solid;
                border-bottom: #999fa4 1px solid;
            }

            > .right {
                float: left;
                width: calc(~"100%" - @left-menu-width);
                height: 100%;
                border-top: #c5c8ca 1px solid;
                border-bottom: #a7acaf 1px solid;
            }
        }

        section#main {
            position: relative;
            height: @main-height;
            //overflow: hidden;
            > .questionnaire-tree {
                height: 100%;

                > .questionnaire-tree-holder {
                    height: 100%;
                    padding-left: @left-menu-width;
                    padding-right: 0;
                    padding-top: @chapter-title-height;
                    background: @designer-editor-lightblue-bg-color;

                    .question-list {
                        position: relative;
                        width: 100%;
                        height: 100%;
                        padding-left: 4px;

                        > .start-box {
                            .questionnarie-startbox-fontstyle();
                            text-align: center;
                            position: static;
                            width: 100%;
                            top: 30%;

                            button {
                                margin-left: 5px;
                                margin-right: 5px;
                                background-color: #edeff1;
                            }

                            p {
                                line-height: 175%;
                                margin: 1.5em 0;
                            }

                            span.left-panel-glyph {
                                display: inline-block;
                                @s: 26px;
                                background: #cbd1d5 url(../i/chapter-panel-btn-small.png) no-repeat center;
                                border-radius: 3px;
                                width: @s;
                                height: @s;
                                vertical-align: middle;
                            }
                        }
                    }
                }

                .chapter-level-buttons {
                    border-top: 2px solid @tree-item-border-color;
                    margin-top: 2px;
                    padding: 8px 24px 30px 18px;

                    .btn{
                        margin-bottom: 10px;
                    }
                }


            }
        }
    }

    .question-editor {
        position: relative;
        height: 100%;
        background: white;
        padding: 0;

        form {
            width: 100%;
            height: 100%;



            > .form-holder {
                padding: 10px 20px;
                height: @form-holder-height;
                overflow: auto;

                .breadcrumbs-container {
                    min-height: 25px;
                    margin-bottom: 5px;

                    .breadcrumbs {
                        .wb-breadcrumbs('gray');
                    }
                }

                .gray {
                    padding: 8px;
                    background: #f1f2f3;
                    border-radius: 4px;
                    .clearfix();
                }

                .form-group {
                    > label {
                        .lucida-console-font();
                        font-size: 14px;
                        color: #5d5d5d;
                        font-weight: normal;
                    }
                }
            }

            > .form-buttons-holder {
                background-color: #fff;
                padding: 10px 20px;
                position: absolute;
                width: 100%;
                height: @form-btns-hldr-height;
                bottom: 0;
                left: 0;
                //margin: 16px 0px;
                .clearfix();

                .pull-left {
                    height: 42px;
                    position: absolute;
                }

                .pull-right {
                    height: 42px;
                }

                .pull-left {
                    > * {
                        margin-right: 12px;
                    }
                }

                .pull-right {
                    > * {
                        margin-left: 12px;
                    }
                }

                > div > a {
                    cursor: pointer;
                    .inline-button-fontstyle();
                }
            }
        }
    }

    .question-editor.commenting {
        height: 50%;
    }

.comments-editor {
    height: 50%;
    padding: 0;
    border-top: 2px solid #dbdfe2;

    form {
        width: 100%;
        height: 100%;

        .form-holder {
            padding: 10px 20px;
            height: 100%;
            overflow: auto;
        }
    }

    .comment {
        background: @questionnarie-question-specific-block-color;
        padding: 5px 17px;
        border-bottom: 2px solid #dbdfe2;

        &.isResolved {
            background: transparent;
        }


        .author {
            margin-right: 10px;
            font-style: italic;
            font-family: Georgia, serif;
            color: #79838a;
        }

        .date {
            font-family: Georgia, serif;
            color: #98a0a5;
            font-style: italic;
        }

        .comment-text {
            color: #000;
            margin: 0;
            white-space: pre-line;
        }
    }

    #edit-entity-comment-row {
        margin-top: 10px;
    }
}

    .highlighted-add {
        border-radius: 4px 4px 0 0;
        background-color: @questionnarie-question-list-item-hover-color;

        .item {
            .item-body {
                border-bottom-color: @questionnaire-item-border-when-highlighted;

                .qname-block {
                    background-color: @questionnarie-question-list-item-hover-color;

                    &:before {
                        #gradient > .horizontal(rgba(237,239,241, 0.0), rgba(237,239,241, 1.0));
                    }

                    .conditions-block {
                        vertical-align: middle;
                        display: inline-block;
                    }

                    .condition-item {
                        height: 6px;
                        width: 6px;
                        display: block;
                        margin: 4px;
                    }
                }
            }

            &.selected {
                .qname-block {
                    background-color: @questionnarie-question-list-item-selected-color;

                    &:before {
                        #gradient > .horizontal(rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 1.0));
                    }

                    .conditions-block {
                        vertical-align: middle;
                        display: inline-block;
                    }

                    .condition-item {
                        height: 6px;
                        width: 6px;
                        display: block;
                        margin: 4px;
                    }
                }
            }
        }
    }

    li.chapter-panel-item {
        position: relative;
        display: block;
        cursor: pointer;


        > .holder {
            display: block;

            > .inner {
                //position: relative;
                display: block;
                padding-left: 18px;
                margin-right: 24px;
                .border-left-radius(4px);

                > .handler {
                    position: absolute;
                    right: 24px;
                    top: 0;
                    bottom: 0;
                    width: 18px;
                    padding: 10px 0;
                    .border-right-radius(4px);

                    span {
                        display: block;
                        width: 100%;
                        height: 100%;
                    }
                }

                > a.chapter-panel-item-body {
                    text-decoration: none;
                    margin: 0;
                    .questionnarie-chapter-list-fontstyle();
                    padding: 14px 23px 16px 0;
                    display: block;
                    min-height: @chapter-item-height;
                    font-weight: bold;
                }
                > .chapter-panel-item-condition{
                    display: block;
                    position: absolute;
                    top: 0;
                    right: 45px;
                    margin: 0;
                    padding: 0;
                    z-index: 100;
                    height: 100%;
                    
                    > .conditions-block{
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        height: 100%;
                    }
                }
            }
        }

        &.current {
            position: relative;
            min-height: @chapter-item-height;

            .holder .inner {
                margin-right: 0;
                padding-right: 24px;
            }

            .holder .inner a.chapter-panel-item-body {
                outline: none;
            }

            > .holder {
                > .inner {
                    background-color: @chapter-item-selected-color;

                    > .handler span {
                        background: @chapter-item-selected-color url(../i/chapter-list-li-dots.png) center no-repeat;
                    }
                }
            }

            &:hover {
                > .holder {
                    > .inner {
                        background-color: @chapter-item-selected-color;

                        > .handler span {
                            background-color: @chapter-item-selected-color;
                        }
                    }
                }
            }
        }

        &:hover {
            position: relative;
            min-height: @chapter-item-height;

            .holder .inner a.chapter-panel-item-body {
                outline: none;
            }

            > .holder {
                > .inner {
                    background-color: @chapter-item-selected-color;
                    .border-right-radius(4px);

                    > .handler span {
                        background: @chapter-item-selected-color url(../i/chapter-list-li-dots.png) center no-repeat;
                        .border-right-radius(4px);
                    }
                }
            }
        }
    }

    .chapter-title {
        padding-left: @left-menu-width + 22px;
        padding-right: 24px;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: @chapter-title-height;
        background: @designer-editor-lightblue-bg-color;
        .questionnarie-chapter-title-fontstyle();
        line-height: @chapter-title-height;
        overflow: hidden;
        z-index: 5;
        border-bottom: 2px solid @tree-item-border-color;

        &.selected {
            background: @questionnarie-question-list-item-selected-color;

            ul.controls-right {
                background: @questionnarie-question-list-item-selected-color;

                &:before {
                    #gradient > .horizontal(rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 1.0));
                }
            }
        }

        > span {
            .questionnarie-chapter-title-span-fontstyle();
        }

        .chapter-title-text {
            white-space: nowrap;
            color: @designer-editor-chapter-list-color;
            text-decoration: none;
            display: block;
            width: 100%;
            
            .warning-message {
                color: @error-message-color;
                margin-left: 25px;
                letter-spacing: 0.05em;
                font-style: italic;
            }
        }
       
       .chapter-condition-block{
           display: block;
           position: absolute;
           top: 0;
           right: 40px;
           margin: 0;
           padding: 0 5px 0 0;
           z-index: 100;
       }

        ul.controls-right {
            display: block;
            position: absolute;
            top: 7px;
            right: 0;
            margin: 0;
            padding: 0;
            padding-right: 5px;
            list-style: none;
            .clearfix();
            background-color: @designer-editor-lightblue-bg-color;

            &:before {
                @w: 45px;
                display: block;
                position: absolute;
                height: 100%;
                content: '';
                width: @w;
                top: 0px;
                left: -@w;
                #gradient > .horizontal(rgba(219, 223, 226, 0.0), rgba(219, 223, 226, 1.0));
            }

            li {
                float: left;
                @side: 40px;
                width: @side;
                height: @side;

                a {
                    display: block;
                    width: 100%;
                    height: 100%;
                    background: no-repeat center 0;

                    &:hover {
                        background-position: center (-@side);
                    }

                    &.filter {
                        background-image: url(../i/filter-glyph.png);
                    }

                    &.search {
                        background-image: url(../i/search-glyph.png);
                    }
                }
            }
        }

        > .search-box {
            @h: 40px;
            position: absolute;
            top: 0;
            left: @left-menu-width;
            right: 0;
            height: @chapter-title-height;
            .clearfix();

            > .input-group {
                margin-top: (@left-menu-width - @h)/2;
                line-height: @h;
                //width: ~"calc(100% - 50px)";
                padding-right: 50px;
                margin-left: 22px;
                float: left;

                > input {
                    height: @h;
                    border: none;
                    padding: 0 14px;
                    width: 100%;
                    .arial-font();
                    font-size: 16px;
                    color: #000;
                    outline: none;
                }

                > span {
                    border: none;
                    background-color: #fff;
                    top: 0;
                }
            }

            > button {
                @btn-size: 40px;
                margin: 7px 0 0 3px;
                line-height: @h;
                width: @btn-size;
                height: @btn-size;
                border: none;
                padding: 0;
                display: block;
                //float: left;
                background: transparent url(../i/cross.png) 0 0;
                position: absolute;
                right: 4px;

                &:hover {
                    background-position: 0 -40px;
                }
            }
        }
    }

    .questionnaire-tree-holder {
        .roster-items {
            .item {
                .item-body {
                    .icon {
                        background-position-x: -60px;
                    }

                    .item-text {
                        color: @questionnaire-tree-roster-color;
                    }
                }
            }
        }
    }

    .questionnaire-tree-holder {
        .roster-items.item {
            .item-body {
                .icon {
                    background-position-x: -60px;
                }
          
                .item-text {
                    color: @questionnaire-tree-roster-color;
                }
            }
        }
    }

    .item {
        position: relative;
        .border-left-radius(4px);
        padding-left: 18px;
        padding-right: 24px;
        white-space: nowrap;
        .questionnarie-question-list-item-fontstyle();

        > a, > a:hover {
            text-decoration: none;
            display: block;
        }

        .item-body {
            height: @questionnaire-tree-item-height;
            line-height: @questionnaire-tree-item-height - 2px;
            border-bottom: 2px solid @tree-item-border-color;
            position: relative;
            padding-left: 29px;
            outline: none;

            .icon {
                position: absolute;
                left: 0;
                top: 7px;
                width: 20px;

                &.icon-numeric,
                &.icon-text {
                    top: 8px;
                }
            }

            button.btn-collapse,
            button.btn-expand {
                @side: 20px;
                display: inline-block;
                position: absolute;
                top: 9px;
                left: 0;
                margin-right: 13px;
                width: @side;
                height: @side;
                background: url(../i/section-collapse-glyph.png) no-repeat;
                border: none;
                vertical-align: bottom;
                outline: none;
            }

            button.btn-collapse {
                background-position: center -8px;
            }

            button.btn-expand {
                background-position: center -40px;
            }

            .item-text {
                overflow: hidden;
                display: inline-block;
                width: 100%;
                background: transparent;
            }

            .variable-name {
                color: @qname-color;
            }

            .qname-block {
                position: absolute;
                right: 0;
                top: 0;
                height: ~"calc(100% - 2px)";
                padding-right: 10px;
                background-color: @questionnarie-question-list-item-bg-color;
                .questionnarie-question-list-item-qname-fontstyle();
                text-transform: none;
                max-width: 240px;
                overflow: hidden;
                text-overflow: ellipsis;

                &:before {
                    @w: 75px;
                    display: block;
                    position: absolute;
                    height: 100%;
                    content: '';
                    width: @w;
                    top: 0px;
                    left: -@w;
                    #gradient > .horizontal(rgba(219, 223, 226, 0.0), rgba(219, 223, 226, 1.0));
                }

                .conditions-block {
                    vertical-align: middle;
                    display: inline-block;
                }

                .condition-item {
                    height: 6px;
                    width: 6px;
                    display: block;
                    margin: 4px;
                }
            }
        }

        &.group {
            > .item-body {
                text-transform: uppercase;
                font-weight: bold;
                outline: none;
            }
        }

        &.roster {
            .item-text {
                color: @questionnaire-tree-roster-color;
            }
        }

        .handler {
            position: absolute;
            top: 0;
            left: 0;
            width: 18px;
            height: 100%;
            z-index: 5;
            .border-left-radius(4px);
        }

        &.selected {
            position: relative;
            margin-right: 0;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
            background: @questionnarie-question-list-item-selected-color;
            padding-top: 2px;
            top: -2px;
            height: @questionnaire-tree-item-height;
            z-index: 498;

            &:hover {
                background-color: @questionnarie-question-list-item-selected-color;

                .handler {
                    background-color: @questionnarie-question-list-item-selected-color;
                }

                .qname-block {
                    background-color: @questionnarie-question-list-item-selected-color;

                    &:before {
                        #gradient > .horizontal(rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 1.0));
                    }

                    .conditions-block {
                        vertical-align: middle;
                        display: inline-block;
                    }

                    .condition-item {
                        height: 6px;
                        width: 6px;
                        display: block;
                        margin: 4px;
                    }
                }
            }

            .dropdown {
                z-index: 501;
            }


            .item-body {
                border-bottom: none;
                outline: none;
            }

            .qname-block {
                background-color: @questionnarie-question-list-item-selected-color;

                &:before {
                    #gradient > .horizontal(rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 1.0));
                }

                .conditions-block {
                    vertical-align: middle;
                    display: inline-block;
                }

                .condition-item {
                    height: 6px;
                    width: 6px;
                    display: block;
                    margin: 4px;
                }
            }
        }


        &:hover {
            position: relative;
            padding-top: 2px;
            top: -2px;
            height: @questionnaire-tree-item-height;
            z-index: 499;
            background-color: @questionnarie-question-list-item-hover-color;

            .handler {
                background-image: url(../i/question-item-dots.png);
                background-repeat: no-repeat;
                background-position: 5px center;
                background-color: @questionnarie-question-list-item-hover-color;
            }

            .item-body {
                border-bottom: none;
                outline: none;
            }

            .dropdown {
                z-index: 500;
            }

            .qname-block {
                background-color: @questionnarie-question-list-item-hover-color;

                &:before {
                    #gradient > .horizontal(rgba(237, 239, 241, 0.0), rgba(237, 239, 241, 1.0));
                }

                .conditions-block {
                    vertical-align: middle;
                    display: inline-block;
                }

                .condition-item {
                    height: 6px;
                    width: 6px;
                    display: block;
                    margin: 4px;
                }
            }

            &.highlight {
                .cursor {
                    top: 0;
                    bottom: 0;
                }
            }
        }

        &.highlight {
            border-radius: 0;

            .cursor {
                position: absolute;
                top: 2px;
                left: 0;
                width: 5px;
                bottom: 2px;
                z-index: 6;
                border-left: 3px solid @common-blue-color;
            }
        }
    }

    .angular-ui-tree-nodes .angular-ui-tree-nodes {
        padding-left: 30px;
    }

    .question-editor .type-container-dropdown {
        width: 100%;

        #questionTypeBtn,
        #rosterTypeBtn,
        .dropdown-menu {
            width: 100%;
        }
    }

    .ps-scrollbar-x-rail,
    .ps-scrollbar-y-rail {
        z-index: 700;
    }

    .ps-scrollbar-y-rail {
        margin-right: 5px;
    }

    .position-fixed {
        position: fixed;
        z-index: 500;
    }

    #show-reload-details-promt {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255,255, 255, 0.6) url(../i/loading-bg.png) repeat;
        z-index: 20;

        .inner {
            position: absolute;
            top: 50%;
            left: 50%;
            height: 50px;
            width: 50%;
            margin: -25px 0 0 -25%;
            line-height: 50px;
            background: #fff;
            text-align: center;
            border-radius: 4px;

            a {
                text-decoration: underline;
            }
        }
    }

    #main .ace-github .ace_marker-layer .ace_bracket {
        margin-top: 0;
    }

    .attachment-preview-window {
        .modal-body img {
            max-width: 100%;
        }
    }

    .pointer {
        cursor: pointer;
    }

.roster-marker {
    text-transform: capitalize;
    font-weight: normal;
    font-style: italic;
    .georgia-font();
}

.ace-github .ace_support.ace_variable  {
    color: @qname-color;
}
